home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / Programming / tek / list / remhead.c < prev    next >
C/C++ Source or Header  |  2001-05-12  |  372b  |  30 lines

  1.  
  2. #include "tek/list.h"
  3.  
  4. /*
  5. **    TEKlib
  6. **    (C) 2001 TEK neoscientists
  7. **    all rights reserved.
  8. **
  9. **    TNODE *TRemHead(TLIST *list)
  10. **
  11. **    unlink node from head of list
  12. **
  13. */
  14.  
  15. TNODE *TRemHead(TLIST *list)
  16. {
  17.     TNODE *temp, *node;
  18.     
  19.     temp = list->head;
  20.     node = temp->succ;
  21.     if (node)
  22.     {
  23.         list->head = node;
  24.         node->pred = (TNODE *) &list->head;
  25.         return temp;
  26.     }
  27.     
  28.     return node;
  29. }
  30.